﻿@{
    Layout = null;
}

@*评价记录*@
@Content.Script(Url, "AntiFake/AppraiseList.js")

<script>
    function showPanel(obj) {
        $(obj).parent().parent().nextAll('.panel-collapse').toggle();
    }
</script>
<div class="mtlr15">
    <form id="SearchForm" role="form" onkeydown="if(event.keyCode==13){return false;}">
        <div class="row">
            <div class="col-lg-4 col-md-4 col-sm-4 col-lg-offset-8 col-md-offset-8 col-sm-offset-8">
                <div class="input-group">
                    <div style="width:100%;display:none"></div>
                    <input type="text" class="form-control" id="wsearch" placeholder="请输入用户名称" onkeydown="if (event.keyCode == 13) { $.MGJ.AppraiseList.Ajax_PagerList(1); }">
                    <span class="input-group-addon" onclick="$.MGJ.AppraiseList.Ajax_PagerList(1);">
                        <span class="glyphicon glyphicon-search"></span>
                    </span>
                    <div class="input-group-btn" style="margin-left:1px;" onclick="detailSearch(this)">
                        <button type="button" class="btn btn-default" style="border: 1px solid transparent;">
                            更多搜索
                            <span class="caret"></span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <div class="detail-search-con" style="display:none">
            <div class="row newrow">
                <div class="col-lg-1 col-md-1 col-sm-1 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 text-right" style="padding:0">
                    产品名称
                </div>
                <div class="col-lg-2 col-md-2 col-sm-2">
                    <input id="StartDate" type="text" name="StartDate" class="form-control" placeholder="产品名称" />
                </div>
                <div class="col-lg-1 col-md-1 col-sm-1 col-sm-2 text-right" style="padding:0">
                    产品批次
                </div>
                <div class="col-lg-2 col-md-2 col-sm-2 col-sm-3">
                    <input id="EndDate" type="text" name="EndDate" class="form-control" placeholder="产品批次" />
                </div>
                <div class="col-lg-2 col-md-2 col-sm-2 col-sm-2 text-center">
                    <button type="button" class="btn btn-default" style="margin-left:23px;" onclick="$.MGJ.AppraiseList.Ajax_PagerList(1, '');">
                        <span class="glyphicon glyphicon-search"></span>
                        搜索
                    </button>
                    <button type="reset" class="btn btn-default">
                        重置
                    </button>
                </div>
            </div>
        </div>
    </form>

    <div id="Table">
        <div class="overflow">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th width="15"><input type="checkbox" class="AllClickCheckbox"></th>
                        <th>用户评价</th>
                        <th> 产品名称</th>
                        <th>用户名称</th>
                        <th>评价时间</th>
                        <th>描述相符</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="AppraiseListTable" style="display:none;" binding="{'pageId':'ShoppingPager','pageCallback':'$.MGJ.AppraiseList.Ajax_PagerList','emptyHtml':ApID_EmptyHtml}">
                    <tr>
                        <td width="15"><input type="checkbox" class="AllClickChild"></td>
                        <td binding="{'text':'CommentContent','title':'CommentContent'}"> </td>
                        <td binding="{'text':'ProductName'}"></td>
                        <td binding="{'text':'NickName'}"></td>
                        <td binding="{'text':'CommentDate','textHandle':'datetime'}"></td>
                        <td class="IsConformed" binding="{'text':'IsConformed'}"> </td>
                        <td>
                            <a class="limitUpd" binding="{'ApID':'ID'}" onclick="$.MGJ.AppraiseList.Ajax_DelAppraiseList(this)">删除</a>
                            <a binding="{'ApID':'ID'}" onclick="$.MGJ.AppraiseList.Dialog_feedback(this)">反馈</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="ShoppingPager"></div>
    </div>
</div>
<script>
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.ApID_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    $(function () {
        $.MGJ.AppraiseList.Ajax_PagerList(1);
    })

    $('#SearchForm').bootstrapValidator({
        fields: {
            StartDate: {
                validators: {
                    regexp: {
                        regexp: /^[a-zA-Z0-9\u4e00-\u9fa5]+$/,
                        message: '产品名称不能输入符号'
                    }
                }
            },
            EndDate: {
                validators: {
                    regexp: {
                        regexp: /^[a-zA-Z0-9\u4e00-\u9fa5]+$/,
                        message: '产品批次不能输入符号'
                    }
                }
            }
        }
    })
</script>